package com.qingzhou.web.service.impl.params.vo.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.qingzhou.web.repository.entity.FamilyHistoryDetail;
import com.qingzhou.web.repository.entity.HistoryDiseaseDetail;
import com.qingzhou.web.repository.entity.NonGeneticDetail;
import com.qingzhou.web.service.impl.convert.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class PatientExcelVo {
    /**
     * 患者基本信息
     */
    @ExcelProperty(value = {"基本信息", "医院Site"}, converter = DictConverter.class)
    @DictParent("hospital_site_dict")
    private String hospitalSite;

    @ExcelProperty(value = {"基本信息", "院区"}, converter = DistrictConverter.class)
    private String districtCode;

    @ExcelProperty(value = {"基本信息", "状态"}, converter = DictConverter.class)
    private String status;

    @ExcelProperty(value = {"基本信息", "患者姓名"})
    private String patientName;

    @ExcelProperty(value = {"基本信息", "患者编号"})
    private String patientCode;

    @ExcelProperty(value = {"基本信息", "所属队列"}, converter = DictConverter.class)
    @DictParent("belong_queue_dict")
    private String belongQueue;

//    @ExcelProperty(value = {"基本信息", "检测项目"}, converter = TestItemConverter.class)
//    private String testItem;

    @ExcelProperty(value = {"基本信息", "医生"})
    private String doctor;

    @ExcelProperty(value = {"基本信息", "住院号"})
    private String beHospitalNum;

    @ExcelProperty(value = {"基本信息", "手机"})
    private String phone;

    @ExcelProperty(value = {"基本信息", "入组日期"})
    @DateTimeFormat("yyyy年MM月dd日")
    private Date enrollmentDate;

    @ExcelProperty(value = {"基本信息", "性别"}, converter = DictConverter.class)
    @DictParent("sys_user_sex")
    private String sex;

    @ExcelProperty(value = {"基本信息", "年龄"})
    private String age;

    @ExcelProperty(value = {"基本信息", "民族"}, converter = DictConverter.class)
    @DictParent("sys_nation_dict")
    private String nation;

    @ExcelProperty(value = {"基本信息", "出生日期"})
    @DateTimeFormat("yyyy年MM月dd日")
    private Date birthDate;

    @ExcelProperty(value = {"基本信息", "初次确诊日期"})
    @DateTimeFormat("yyyy年MM月dd日")
    private Date firstDiagDate;

    @ExcelProperty(value = {"基本信息", "确诊年龄"})
    private String diagAge;

    @ExcelProperty(value = {"基本信息", "生存情况"}, converter = DictConverter.class)
    @DictParent("sys_life_status")
    private String lifeStatus;

    @ExcelProperty(value = {"基本信息", "籍贯"}, converter = ReginConverter.class)
    private String birthplace;

    @ExcelProperty(value = {"基本信息", "现居地"}, converter = ReginConverter.class)
    private String currentResidence;

    @ExcelProperty(value = {"基本信息", "职业"})
    private String job;

    @ExcelProperty(value = {"基本信息", "婚姻"}, converter = DictConverter.class)
    @DictParent("marriage_dict")
    private String maritalStatus;

    @ExcelProperty(value = {"基本信息","组别"}, converter = DictConverter.class)
    @DictParent("belonging_group_dict")
    private String belongingGroup;

    /**
     * 体格检查
     */
    @ExcelProperty(value = {"体格检查", "身高(cm)"})
    private String height;

    @ExcelProperty(value = {"体格检查", "体重(Kg)"})
    private String weight;

    @ExcelProperty(value = {"体格检查", "ECOG体能评分"})
    private String ecogScore;

    @ExcelProperty(value = {"体格检查", "KPS评分"})
    private String kpsScore;

    @ExcelProperty(value = {"体格检查", "备注"})
    private String physicalRemarks;

    /**
     * 既往史
     */
    @ExcelProperty(value = {"既往史", "有无既往疾病"}, converter = DictConverter.class)
    @DictParent("sys_have_no")
    private String hasHistoryDisease;

    @ExcelProperty(value = {"既往史", "既往病史明细"}, converter = HistoryDiseaseDetailConverter.class)
    private List<HistoryDiseaseDetail> historyDiseaseDetails;

    /**
     * 药物过敏史
     */
    @ExcelProperty(value = {"药物过敏史", "有无药物过敏史"}, converter = DictConverter.class)
    @DictParent("sys_have_no")
    private String hasMedicationsHistory;

    @ExcelProperty(value = {"药物过敏史", "药物过敏史明细"}, converter = MedicationsHistoryNamesConverter.class)
    private List<String> medicationsHistoryNames;

    /**
     * 吸烟/饮酒
     */
    @ExcelProperty(value = {"吸烟/饮酒", "是否吸烟"}, converter = DictConverter.class)
    @DictParent("smoke_dict")
    private String isSmoke;

    @ExcelProperty(value = {"吸烟/饮酒", "每天吸烟支数"})
    private String smokingCountPerDay;

    @ExcelProperty(value = {"吸烟/饮酒", "吸烟年数"})
    private String smokingYears;

    @ExcelProperty(value = {"吸烟/饮酒", "吸烟指数"})
    private String smokingScore;

    @ExcelProperty(value = {"吸烟/饮酒", "戒烟年数"})
    private String quitSmokingTime;

    @ExcelProperty(value = {"吸烟/饮酒", "是否饮酒"}, converter = DictConverter.class)
    @DictParent("is_drink_dict")
    private String isDrink;

    @ExcelProperty(value = {"吸烟/饮酒", "每天饮酒量"})
    private String dailyAlcoholIntake;

    @ExcelProperty(value = {"吸烟/饮酒", "饮酒年数"})
    private String drinkingYears;

    @ExcelProperty(value = {"吸烟/饮酒", "戒酒年数"})
    private String quitDrinkingYears;

    @ExcelProperty(value = {"输血史"}, converter = DictConverter.class)
    @DictParent("sys_have_no")
    private String transBloodHistory;
    /**
     * 家族肿瘤史
     */
    @ExcelProperty(value = {"家族肿瘤史", "有无家族肿瘤史"}, converter = DictConverter.class)
    @DictParent("sys_have_no")
    private String hasFamilyHistory;

    @ExcelProperty(value = {"家族肿瘤史", "家族肿瘤史明细"}, converter = FamilyHistoryDetailConverter.class)
    private List<FamilyHistoryDetail> familyHistoryDetails;

    @ExcelProperty(value = {"非遗传性家族史", "有无非遗传性家族史"}, converter = DictConverter.class)
    @DictParent("sys_have_no")
    private String hasNonGenetic;

    @ExcelProperty(value = {"非遗传性家族史", "非遗传性家族史明细"}, converter = NonGeneticDetailConverter.class)
    private List<NonGeneticDetail> nonGeneticDetails;

    @ExcelProperty("下次随访提醒日期")
    @DateTimeFormat("yyyy年MM月dd日")
    private Date visitRemindDate;

    @ExcelProperty("数据检查原因")
    private String editReason;

    @ExcelProperty("终止原因")
    private String stopReason;

    @ExcelProperty("备注")
    private String remark;

    @ExcelProperty(value="创建人",converter = UserConverter.class)
    private String createBy;

    @ExcelProperty("创建时间")
    private Date createTime;
}
